import React from "react";
import "../css/header.css";
class header extends React.Component {
    constructor() {
        super();
        this.state = {
            list: ["新闻", "hao123", "地图", "视频", "贴吧", "学术", "更多"]
        }
    }
    render() {
        return (
            <div>
                <ul>
                    {
                        this.state.list.map((element, index) => {
                            return <li key={index} onClick={() => {
                            alert(element)
                            }}>
                                {element}
                            </li>
                        })
                    }
                </ul>
            </div>
        )
    }
}
export default header;